package com.flower.enjoyment.flower.mapper;

import com.flower.enjoyment.flower.entity.ShopInfo;
import com.flower.enjoyment.flower.entityDo.ShopInfoDo;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ShopMapper {
    int deleteByPrimaryKey(String id);

    int insert(ShopInfo record);

    int insertSelective(ShopInfo record);

    ShopInfoDo selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(ShopInfo record);

    int updateByPrimaryKey(ShopInfo record);

    /**
     * 获取推荐商铺列表
     * @return
     */
    List<ShopInfoDo> getCommendShopHomeList();
    /**
     * 获取商铺列表
     * @return
     */
    Page<ShopInfoDo> getCommendShopListByPage(@Param("lon") String lon, @Param("lat") String lat);

    /**
     * 个人店铺信息
     * @param userId
     * @return
     */
    ShopInfoDo selectByUserId(String userId);

    /**
     * 常去店铺
     * @param userId
     * @return
     */
    Page<ShopInfoDo> selectResortShopListByPage(@Param("userId") String userId);

    /**
     * 根据店铺id获取店铺简约信息
     * @param shopId
     * @return
     */
    ShopInfoDo selectByShopId(@Param("shopId") String shopId);

   int selectCountByUserId (@Param("userId") String userId);
}